FROM python:3.9
WORKDIR /alertbot
COPY ./requirements.txt /alertbot/requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple \
    && apt install -y tzdata \
    && ln -fs /usr/share/zoneinfo/PRC /etc/localtime \
    && dpkg-reconfigure --frontend noninteractive tzdata \
    && rm -rf /var/lib/apt/lists/*
COPY ./feishu /alertbot/feishu
CMD [ "uvicorn","feishu.main:app","--host","0.0.0.0","--port","7999","--log-config","./feishu/uvicorn_config.json" ]